<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function Star(uname, age) {
            this.uname = uname;
            this.age = age;
            this.say = function(say) {
                console.log(say);
            }
        }
        var zs = new Star('张三', 19);
        console.log(zs['uname']);
        console.log(zs.age);
        zs.say('构造函数首字母要大写');
    </script>
</head>

<body>

</body>

</html>